import { defineStore } from 'pinia'

export const useUserStore = defineStore('userStore', {
    state: () => ({
        user: {
            name: '张三',
            age: 18,
            sex: '男',
            address: '北京市',
            phone: '13888888888',
            email: 'zhangsan@example.com',
        }
    }),
    actions: {
        // 设置用户信息
        setUser(user) {
            this.user = user
        }
    }
})